import Taro, {Component} from '@tarojs/taro'
import {Checkbox, Text, View} from '@tarojs/components'
import {connect} from '@tarojs/redux'
import './shoppingCart.less'
import {AtNoticebar, AtDivider, AtMessage} from 'taro-ui'
import Shopping from '../../components/shopping/shopping'
import MyButton from '../../components/myButton/myButton'

@connect(({shoppingCart}) => ({
  ...shoppingCart,
}))

class ShoppingCart extends Component {
  config = {
    navigationBarTitleText: '购物车'
  }

  constructor(props) {
    super(props)
    this.state = {}
  }

  componentWillMount() {
  }

  componentDidMount() {
  }

  componentWillUnmount() {
  }

  componentDidShow() {
  }

  componentDidHide() {
  }

  render() {


    return (
      <View className='fx-shoppingCart-wrap'>
        <AtMessage/>
        <AtNoticebar icon='map-pin'>
          北京朝阳区三环到...
        </AtNoticebar>

        <Shopping dataSource={[]}/>
        <Shopping dataSource={[]}/>

        <View className='my-divider'>
          <AtDivider content='可能你想要' fontSize='26' fontColor='#999'/>
        </View>

        <View className='at-row shopping-settlement'>
          <View className='at-col at-col-3 shopping-checkbox'>
            <Checkbox color='red' checked={false}>全选</Checkbox>
          </View>
          <View className='at-col at-col-5 shopping-money'>
            总计：
            <Text className='shopping-money-num'>
              ￥0.00
            </Text>
          </View>
          <View className='at-col at-col-4'>
            <MyButton
              type='warn'
              style={{border: 0, borderRadius: 0}}
              onClick={() => {
                Taro.atMessage({
                  'message': '建设中...',
                })
              }}
            >
              去结算
              <Text className='shopping-num'>
                （0件）
              </Text>
            </MyButton>

          </View>
        </View>

      </View>
    )
  }
}

export default ShoppingCart
